﻿using UnityEngine;
using System.Collections;

public class SlowTeleportShots : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.tag == "teleportShot")
        {
            collision.gameObject.GetComponent<TeleportShotManager>().SetSlowdown(true);
        }
    }

    void OnCollisionExit(Collision collision)
    {
        if (collision.gameObject.tag == "teleportShot")
        {
            collision.gameObject.GetComponent<TeleportShotManager>().SetSlowdown(false);
        }
    }

    void OnTriggerEnter(Collider collider)
    {
        if (collider.tag == "teleportShot")
        {
            collider.GetComponent<TeleportShotManager>().SetSlowdown(true);
        }
    }

    void OnTriggerExit(Collider collider)
    {
        if (collider.tag == "teleportShot")
        {
            collider.GetComponent<TeleportShotManager>().SetSlowdown(false);
        }
    }

}
